<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title data-i18n="head.title">ApiDebug-Http接口调试插件</title>
	<link href="source/base.css" rel="stylesheet" type="text/css" />
	<link href="source/tools/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="source/plug.css" rel="stylesheet" type="text/css" />
	<link href="source/tools/jquery-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="source/tools/jquery.jsonview.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<input id="id-page-name" type="hidden" value="debug">
	<nav class="h50 CFFF pl20 pt5 w shadow fixed z10" style="background:#233050;">
		<a id="id-advertisement-href" href="http://api.crap.cn/" target="_blank">
			<img id="id-advertisement-img"  src="logo.png" class="h30 mt4 ml10 fl">
			<button id="id-advertisement-text" class="btn btn-menu btn-sm fl cursor mt5 ml10 ndis"></button>
		</a>

		<a id="synch" target="_blank" class="btn btn-menu btn-main btn-sm fl ml20 mt5">
			<i class="iconfont mr5 mt-1 fb" id="synch-ico">&#xe800;</i>
			<span data-i18n="nav.sync">同步数据</span>
		</a>

		<a id="clear-local-data" target="_blank" class="btn btn-menu btn-adorn btn-sm fl ml10 mt5">
			<i class="iconfont mr5 mt-1">&#xe69d;</i>
			<span data-i18n="nav.clearLocal">清除本地数据</span>
		</a>

		<button target="_blank" class="btn btn-menu btn-default btn-sm fl ml10 mt5 goHref" crap-href-title="l_changeProject" crap-href="PLUG:changeProject.html">
			<i class="iconfont mr5 f10 mt-1 ml5">&#xe6aa;</i>
			<span id="id-current-project-name">默认调试项目</span>
			<img id="id-current-project-cover" class="w15 r20 h15 mr5" src="source/image/defCover.jpg"/>
		</button>


		<a class="fl mr10 pl10 pr10 pt5 pb5 mt5 ml20 f12 r5 text-success ndis" id="id-notice" data-i18n="welcomeTip" href="setting.html">提示</a>

		<a id="login-button" target="_blank" class="btn btn-menu btn-main btn-sm fr mr10 mt5">
			<i class="iconfont mr5 mt-1">&#xe6b8;</i>
			<span data-i18n="login">登录</span>
		</a>

		<a id="id-logout" class="btn btn-menu btn-sm fr mr10 mt5 ndis btn-adorn">
			<i class="iconfont mr5 mt-1">&#xe60d;</i>
			<span id="id-user-name"></span>
			<span data-i18n="nav.loginOut">退出</span>
		</a>


		<a href="json.html" target="_blank" class="btn btn-menu btn-sm fr mr10 mt5">
			<i class="iconfont mr5 mt-1">&#xe600;</i>
			<span data-i18n="jsonTool">Json工具</span>
		</a>
		<a href="debug.html" target="_blank" class="btn btn-menu btn-sm fr mr10 mt5">
			<i class="iconfont mr5 mt-1">&#xe880;</i>
			<span data-i18n="nav.newTab">打开新页面</span>
		</a>

		<a id="new-interface" target="_blank" class="btn btn-menu btn-sm fr mr10 mt5">
			<i class="iconfont mr5 mt-1">&#xe6b9;</i>
			<span data-i18n="nav.newInterface">新建接口</span>
		</a>

		<button id="id-web-edit-interface" class="btn btn-menu btn-sm fr mt5 goHref mr50 ndis" crap-href-title="l_editInterfaceTitle"  data-i18n="[crap-href]url.editInterface">
			<i class="iconfont mr5 mt-1">&#xe69e;</i>
			<span data-i18n="inter.editDoc">编辑文档</span>
		</button>

		<a id="id-web-view-interface" class="btn btn-menu btn-sm fr mt5 goHref mr10 ndis" crap-href-new-page="true" data-i18n="[crap-href]url.viewInterface">
			<i class="iconfont mr5 mt-1">&#xe6e6;</i>
			<span data-i18n="inter.vieDoc">查看文档</span>
		</a>
	</nav>

	<div class="w h pt10 fixed min-w900" id="content">

		<!-- *****************************left************************************ -->
		<div id="left" class="h m0 fl p0 shadow ofy-a" style="width:18%">
			<!-- 搜索 -->
			<div id="id-search" class="mt50 h35 m10 mb0 b1 r15 of-h input-group pl5">
				<i class="iconfont group-addon w15 h color-adorn fb">&#xe6ac;</i>
				<input type="text" id="id-search-text" autocomplete="off" class="form-control b0 h" data-i18n="[placeholder]searchTip">
				<i class="iconfont group-addon w15 h cursor" id="id-clear-search">&#xe69a;</i>&nbsp;&nbsp;
			</div>
            <!--接口请求头、参数等切换标签-->
            <div class="bb1 h45 f14 C555 pt5">
				<div class="bb2 fl w-50 tc h40 lh40 cursor" id="modules-title" title="Module">
					<i class="iconfont f16">&#xe615;</i>&nbsp;&nbsp;
					<span data-i18n="module">模块</span>
				</div>
				<div class="fl w-50 tc h40 lh40 cursor" id="historys-title" title="History">
					<i class="iconfont f16">&#xe6bb;</i>&nbsp;&nbsp;
					<span data-i18n="left.history">历史记录</span>
				</div>
            </div>
			<!--历史记录 -->
			<div id="historys" class="none w"></div>
			<!--模块-->
			<div id="modules" class="w panel-group mb0" role="tablist"></div>
        </div>
		<!-- ****************************left end*********************************** -->

		<div id="right" class="BGFFF h m0 fr p0 ofy-s fl" style="width:82%">

			<!--顶部空白-->
			<div class="BGF9 h40 w"></div>
			<div class="cb"></div>

			<!--参数、头、相应结果-->
			<div class="w h mt10 rel">
				<input type="hidden" id="interface-id" value="-1"/>
				<input type="hidden" id="module-id" value="-1"/>

				<div class="pl10 pr10">
					<!-- 1.接口名 -->
					<div class="input-group no-radius" id="id-env-group">
						<span class="w10 group-addon bl3"></span>
						<input type="text" class="form-control r0 f16 color-main h37" id="interface-name" autocomplete="off" data-i18n="[placeholder]interfaceNameTip"/>
						<!-- 环境 -->
						<span class="w10 group-addon"></span>
						<div class="dropdown group-addon h37 no-radius">
							<button type="button" class="btn btn-default dropdown-toggle h37 f12 no-radius" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
								<i class="iconfont mt-2 f16">&#xe641;</i>
								<span id="id-current-env-name"></span>
								<i class="iconfont pl5">&#xe614;</i>
							</button>
							<ul class="dropdown-menu dropdown-menu-right f12" id="id-interface-env-list"></ul>
						</div>
					</div>
				</div>

				<!-- 2.接口名 -->
				<table class="w mt10">
						<tr>
							<td class="w100 pr10 pl10">
								<select class="form-control group-addon w100 h37 dis-in-tab BGF5 cursor" id="method">
									<option value="GET">GET</option>
									<option value="POST">POST</option>
									<option value="PUT">PUT</option>
									<option value="DELETE">DELETE</option>
								</select>
							</td>
							<td class="pr10">
								<div class="input-group">
									<input type="text" class="form-control r5 h37" id="url" data-i18n="[placeholder]right.interfaceUrl" autocomplete="off">
									<span class="w10 group-addon"></span>

									<span class="btn group-addon btn-main ml10 f12" id="send">
										<span data-i18n="right.send" class="pl10">发送</span>
										<i class="iconfont f16 mr5 mt-2">&#xe634;</i>
									</span>

									<span class="w10 group-addon"></span>

									<span class="btn btn-adorn group-addon no-right-radius h37 f12" id="save-interface" data-i18n="save">
										保存
									</span>

									<div class="dropdown group-addon h37">
										<button type="button" class="btn btn-adorn dropdown-toggle no-left-radius h37 pl5 pr5ß" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
											<i class="iconfont CFFF">&#xe614;</i>
										</button>
										<ul class="dropdown-menu dropdown-menu-right">
											<li><a id="save-as-interface" class="pl10 pr10 cursor f12" data-i18n="saveAs">另存为</a></li>
											<!--<li><a href="#" class="pl10 pr10">Another</a></li>
                                            <li><a href="#" class="pl10 pr10">Something</a></li>
                                            <li role="separator" class="divider pl10 pr10"></li>
                                            <li><a href="#" class="pl10 pr10">Separated</a></li>-->
										</ul>
									</div>

								</div>
							</td>

						</tr>
				</table>

				<!--接口请求头、参数等切换标签-->
				<div class="h30 mt20 shadow-b pl10 C555">
					<div class="params-title menu-title" data-stage="headers-div">
						<i class="iconfont color-adorn">&#xeedf;</i>&nbsp;
						<span data-i18n="right.header">请求头</span>
					</div>
                    <div class="params-title menu-title adorn-bb2" data-stage="params-div">
						<i class="iconfont color-adorn">&#xe60e;</i>&nbsp;
						<span data-i18n="right.param">参数</span>
					</div>
				</div>

                <!--请求头-->
                <div class="p15 none" id="headers-div">
                    <table class="params-headers-table f12 w"  id="headers-table">
					<thead>
							<tr>
								<td class="p5" style="width:30%">
									Key
								</td>
								<td class="p5" colspan="2">
									 Value
									 <a class="bulk-edit fr mr20 color-main cursor fw-300" crap-data-value="headers" data-i18n="right.batchEdit">批量编辑</a>
								</td>
							</tr>
						</thead>
						<tbody>
							<tr class="last">
								<td>
									<input type="text" class="form-control" data-stage="key">
								</td>
								<td>
									<input type="text" class="form-control" data-stage="value">
								</td>
								<td class="w20"><i class="iconfont">&#xe69d;</i></td>
							</tr>
						</tbody>
                    </table>
					
					<div id="headers-bulk-edit-div" class=" f12 none">
							<a class="key-value-edit fr mr20 color-main cursor fw-300" crap-data-value="headers" data-i18n="right.singleEdit">单个编辑</a>
							<textarea id="headers-bulk" class="form-control w BGFFF min-h100 max-w" placeholder="key:value"></textarea>
						</div>
                </div>
				<!--请求头-->

                <!--参数-->
                <div id="params-div">
                    <div id="content-type" class="f12 p10 C999 pl20 none">
						<div class="fl">
							<input type="radio" name="param-type" checked  id="param-type-value"  value="application/x-www-form-urlencoded;charset=UTF-8"> x-www-form-urlencoded;charset=UTF-8&nbsp;&nbsp;&nbsp;
						</div>
						<div class="fl">
							<input type="radio" name="param-type" crap-data="customer" id="customer-type-value" value="application/json">
							<span data-i18n="right.custom">自定义格式</span>&nbsp;&nbsp;&nbsp;
						</div>
						<select class="form-control none w150 fl table-input" id="customer-type">
							<option value="application/json">application/json</option>
							<option value="text/plain">text/plain</option>
							<option value="application/xml">application/xml</option>

						</select>
						<div class="cb"></div>

					</div>

                    <div class="p15">
						<table class="params-headers-table f12 w" id="params-table">
							<thead>
							   <tr>
									<td class="p5" style="width:30%">
										Key
									</td>
									<td class="p5" colspan="2">
										 Value
										 <a class="bulk-edit fr mr20 color-main cursor" crap-data-value="params" data-i18n="right.batchEdit">批量编辑</a>
									</td>
								</tr>
							</thead>
							<tbody>
								<tr class="last">
									<td>
										<input type="text" class="form-control" data-stage="key">
											</td>
									<td>
										<input type="text" class="form-control" data-stage="value">
									</td>
									<td class="w20"><i class="iconfont">&#xe69d;</i></td>
								</tr>
							</tbody>
						</table>

						<div id="customer-div" class=" f12 none">
							<textarea id="customer-value" class="form-control w BGFFF min-h100 max-w" placeholder=""></textarea>
						</div>

						<div id="params-bulk-edit-div" class=" f12 none">
							<a class="key-value-edit fr  mr20 color-main cursor" crap-data-value="params" data-i18n="right.singleEdit">单个编辑</a>
							<textarea id="params-bulk" class="form-control w BGFFF min-h100 max-w" placeholder="key:value"></textarea>
						</div>
                    </div>
                </div>
                <!--参数：end-->

                <!--response-->
				<!--response-title-->
                <div class="h30 mt10 shadow-b pl10 C555 mb10">
                    <div class="mt10 f14 tl w">
						<div class="response-title menu-title bb2" data-stage="response-body">
							<i class="iconfont color-main">&#xe606;</i>&nbsp;
							<span data-i18n="right.responseBody">响应体</span>
						</div>
						<div class="response-title menu-title" data-stage="response-header">
							<i class="iconfont color-main">&#xeedf;</i>&nbsp;
							<span data-i18n="right.responseHeader">响应头</span>
						</div>
						<div class="response-title menu-title" data-stage="response-cookie">
							<i class="iconfont color-main">&#xea45;</i>&nbsp;
							<span data-i18n="right.responseCookie">Cookie</span>
						</div>
						<div class="cb"></div>
					</div>
                </div>

				<!--response-menu-->
				<div class="response-body p10 pb0 pt0 fw-300">
					<div class="btn-group fw-300 f12" role="group">
						<button type="button" class="response-menu btn btn-default btn-xs fw-300" id="format-row" data-i18n="json.row">原始返回</button>
						<button type="button" class="response-menu btn btn-default btn-xs fw-300" id="format-pretty" data-i18n="json.pretty">格式化</button>
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;JSON:
					<div class="btn-group fw-300 f12" role="group">
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" id="json-expand" crap-data-name="expand" crap-data-value="1" data-i18n="json.expand">全部展开</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" crap-data-name="collapse" crap-data-value="1" data-i18n="json.collapseOne">展开一级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" crap-data-name="collapse" crap-data-value="2" data-i18n="json.collapseTwo">展开二级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" crap-data-name="collapse" crap-data-value="3" data-i18n="json.collapseThree">展开三级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" crap-data-name="collapse" crap-data-value="4" data-i18n="json.collapseFour">展开四级</button>
						<button type="button" class="response-menu response-json btn btn-default btn-xs fw-300" crap-data-name="nl2br" crap-data-value="true" data-i18n="json.nl2br">自动换行</button>
					</div>

					<a class="btn btn-default btn-xs fw-300" target="_blank" data-i18n="[href]jsonToolDocUrl">
						<i class="iconfont mr5 fw-300">&#xe6a3; </i><span data-i18n="help">帮助文档</span>
					</a>
				</div>
				<!--response-menu:end-->

                <div class="p10 ofy-s min-h400">

					<div class="response-body">
						<!--row-->
						<textarea id="response-row" class="form-control w h BGFFF min-h400 hidden" placeholder="Hit the Send buttom to get a response"></textarea>

						<!--pretty-->
						<div id="response-pretty" class="b1 p10 BGFFF min-h400">
							<div class="tc mt100 CAAA f16 fw-300">
								<span data-i18n="response.responseTip">请点击发送请求按钮测试接口</span>
								<a class="cursor C999 no_unl" target="_blank"  data-i18n="[href]helperDocUrl" href="http://api.crap.cn/static/help/155037970568801000060.html">
									<span data-i18n="response.responseHelp">帮助</span>
								</a>
							</div>
							<div class="tc mt20">
								<span class="BGEEE w200 h20 dis-in-blo mr10">   </span>
								<span class="bg-main w100 h20 dis-in-blo mr10">   </span>
								<span class="BGEEE w50 h20 dis-in-blo mr10">   </span>
							</div>
							<div class="tc mt10">
								<span class="BGEEE w200 h20 dis-in-blo mr10">   </span>
								<span class="BGEEE w50 h20 dis-in-blo mr10">   </span>
							</div>
						</div>
					</div>

					<!--header-->
					<div class="response-header b1 p10 min-h400 none BGFFF">
						<div class="fw-300">General:</div>
						<div class="ml20 general"></div>
						<div class="fw-300 mt20">Response Headers:</div>
						<div class="ml20 headers"></div>
					</div>

					<!--cookie-->
					<div class="response-cookie b1 p10 min-h400 none BGFFF">
						<table class="table"></table>
					</div>
                </div>
			</div>
		</div>
	</div>
	
	<div id="float" class="folat">
		<div class="tc CFFF f20 fb" id="id-timing"></div>
		<div class="sk-wave">
			<div class="sk-rect sk-rect1"></div>
			<div class="sk-rect sk-rect2"></div>
			<div class="sk-rect sk-rect3"></div>
			<div class="sk-rect sk-rect4"></div>
			<div class="sk-rect sk-rect5"></div>
		</div>
	</div>
	<div class="tip-div" id="tip-div"></div>
	<div id="fade" class="folat"></div>

	<div id="dialog" class="look-up shadow">
		<div id="dialog-title" class="CFFF f16 shadow dialog-title">
		</div>
		<div id="dialog-content" class="look-up-content b0 f12 tl p30 BGFFF C555">
			<table class="table table-bordered">
				<tr>
					<td data-i18n="interfaceName">接口名</td>
					<td>
						<input class="form-control" id="save-interface-name" data-i18n="[placeholder]interfaceNameTip"/>
					</td>
				</tr>
				<tr>
					<td data-i18n="moduleName">模块</td>
					<td>
						<span data-i18n="saveModuleTip">保存到已有的模块（已有模块与新模块名二选一）</span>
						<select class="form-control" id="save-module-id">

						</select>
					</td>
				</tr>
				<tr>
					<td data-i18n="moduleName">模块名</td>
					<td>
						<span data-i18n="newModuleTip">创建新的模块（已有模块与新模块名二选一）</span>
						<input class="form-control" id="save-module-name" data-i18n="[placeholder]moduleNameTip"/>
					</td>
				</tr>

			</table>
			<button type="button" class="btn btn-main fr" id="save-interface-submit" data-i18n="save">保存</button>

		</div>
		<i class="iconfont i-close CFFF fb f16 close-dialog" crap-data="dialog">&#xe69a;</i>
	</div>
	<div id="dialog2" class="look-up shadow">
		<div class="CFFF f16 shadow" style="line-height:40px;padding-left:20px; height:40px; background-color:#233050;" data-i18n="renameModule">
			Rename module
		</div>
		<div class="look-up-content b0 f12 tl p30 BGFFF C555">
			<table class="table table-bordered">
				<tr>
					<td data-i18n="moduleName">Module Name</td>
					<td>
						<input class="form-control" id="rename-module-id" type="hidden"/>
						<input class="form-control" id="rename-module-name" data-i18n="[placeholder]moduleNameTip"/>
					</td>
				</tr>

			</table>
			<button type="button" class="btn btn-main fr" id="save-module-submit" data-i18n="save">Save</button>

		</div>
		<i class="iconfont i-close CFFF fb f16 close-dialog" crap-data="dialog2">&#xe69a;</i>
	</div>

	<div id="iframe-dialog" class="look-up shadow p0 of-h">
		<div id="id-iframe-dialog-title" class="CFFF f16 shadow" style="line-height:40px;padding-left:20px; height:40px; background-color:#233050;"></div>
		<div class="look-up-content b0 f12 tl p0 m0 of-h">
			<iframe id="iframe-dialog-iframe" class="w h b0 m0"></iframe>
		</div>
		<i class="iconfont i-close CFFF fb f16 close-dialog" id="iframe-dialog-close" crap-data="iframe-dialog">&#xe69a;</i>
	</div>

	<script src="source/constant.js"></script>
	<script src="source/tools/jquery-1.9.1.min.js"></script>
	<script src="source/tools/i18next-1.11.2.min.js"></script>
	<script src="source/tools/bootstrap.js"></script>
	<script src="source/base-dao.js"></script>
	<script src="source/interface-dao.js"></script>
	<script src="source/env-dao.js"></script>
	<script src="source/module-dao.js"></script>
	<script src="source/plug-function.js"></script>
	<script src="source/crapApi.js"></script>
	<script src="source/env.js"></script>
	<script src="source/tools/jquery.jsonview.js"></script>
	<script src="source/json.js"></script>
	<script type="text/javascript" src="source/tools/jquery-ui.min.js"></script>
</body>
</html>